package com.zp.service;

import com.zp.dao.BookMapper;
import com.zp.pojo.Books;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author:周鹏
 * @date: 2020/12/7 15:56
 * @description:
 */
public class BookServiceImp implements BookService{
    @Autowired
    private BookMapper bookMapper;

    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }
    public int addBook(Books book) {
        return bookMapper.addBook(book);
    }

    public int deleteBook(Integer id) {
        return bookMapper.deleteBook(id);
    }

    public int updateBook(Books book) {
        return bookMapper.updateBook(book);
    }

    public Books selectById(Integer id) {
        return bookMapper.selectById(id);
    }

    public List<Books> selectAll() {
        return bookMapper.selectAll();
    }

}
